﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace ApplicationLayer
{
    public class Player
    {
        public List<MyPiece> pieces = new List<MyPiece>();
        public int score = 0;
        public string name = "";
        public Color color = Color.White;
        public int[,] playerMap;
        public bool gameover = false;
        public static int NEUTRAL = 0;
        public static int SIDE = -1;
        public static int CORNER = 1;

        public int getNumberOfPiecesAvailable()
        {
            int num = 0;
            foreach (MyPiece p in pieces)
            {
                if (p.isAvailable)
                    num++;
            }
            return num;
        }

        public Player getCopy()
        {
            Player pl = new Player();
            foreach (MyPiece p in this.pieces)
                pl.pieces.Add(p.getCopy());
            pl.score = this.score;
            pl.name = this.name;
            pl.color = this.color;
            pl.gameover = this.gameover;
            return pl;
        }
    }
}
